<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CaForm extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('ca_form', function (Blueprint $table) {
            $table->id('form_id')->comment('自增id');
            $table->string('name')->comment('字段名');
            $table->string('field',77)->comment('字段');
            $table->integer('type')->comment('类型->1:单行输入框2:日期选择3:密码4:范围5:单行选择框6:分组选择框7:搜索选择框8:联动选择框9:复选框10:原始复选框11:开关-默认关12:开关-默认开13:单选框14:普通文本域15:富文本编辑器16:单文件上传17:多文件上传18:单图上传19:多图上传777:自定义类型');
            $table->string('table_name')->comment('表名');
            $table->integer('sort')->comment('排序');
            $table->json('extend')->comment('扩展信息');
            $table->integer('required')->comment('0非必填1必填');
            $table->string('verify')->comment('验证方式');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
